package org.opens.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping(value = "/data")
public class DataController {

    @RequestMapping(value = "/{id}")
    public Map<String, Object> getOne(
            @PathVariable(value = "id") Integer id
    ) {
        Map<String, Object> result = new HashMap<>();
        result.put("id", id);
        return result;
    }

    @RequestMapping(value = "/admin/{id}")
    public Map<String, Object> getAuthcOne(
            @PathVariable(value = "id") Integer id
    ) {
        Map<String, Object> result = new HashMap<>();
        result.put("id", id);
        return result;
    }

}
